//
//  YYTakeCarWayVC.m
//  drivingSchool
//
//  Created by 子yu 刘 on 2018/8/18.
//  Copyright © 2018年 子yu 刘. All rights reserved.
//

#import "YYTakeCarWayVC.h"

@interface YYTakeCarWayVC ()<UITextViewDelegate>
@property (nonatomic ,copy)NSString * inspect_type;

@end

@implementation YYTakeCarWayVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tvAdress.delegate = self;
    self.inspect_type = @"0";
}

-(void)textViewDidChange:(UITextView *)textView{
    if (textView.text.length == 0) {
        self.lbNormal.hidden = NO;
    }else{
        self.lbNormal.hidden = YES;
    }
}
- (IBAction)choosePersonal:(id)sender {
    self.inspect_type = @"0";
    [self.btn1 setImage:DEF_IMAGENAME(@"sign_inspection vehicle_checkbox") forState:UIControlStateNormal];
     [self.btn2 setImage:DEF_IMAGENAME(@"sign_inspection vehicle_checkbox_anselected") forState:UIControlStateNormal];
    self.adressView.hidden = YES;
}
- (IBAction)FromDoor:(id)sender {
    self.inspect_type = @"1";
    [self.btn1 setImage:DEF_IMAGENAME(@"sign_inspection vehicle_checkbox_anselected") forState:UIControlStateNormal];
    [self.btn2 setImage:DEF_IMAGENAME(@"sign_inspection vehicle_checkbox") forState:UIControlStateNormal];
     self.adressView.hidden = NO;
}

- (IBAction)corfirme:(id)sender {
    if (_block) {
        self.block(self.inspect_type, self.tvAdress.text);
    }
    [self.navigationController popViewControllerAnimated:YES];
}


@end
